import { jwtConstants } from '@/constants';
import { DynamicComment } from '@/entity/dynamic-comment.entity';
import { DynamicFollow } from '@/entity/dynamic-follow.entity';
import { DynamicLike } from '@/entity/dynamic-like.entity';
import { DynamicReply } from '@/entity/dynamic-reply.entity';
import { Dynamic } from '@/entity/dynamic.entity';
import { IntegralTask } from '@/entity/integral-task.entity';
import { StudyMatchResult } from '@/entity/study-match-result.entity';
import { User } from '@/entity/user.entity';
import { Module } from '@nestjs/common';
import { JwtModule } from '@nestjs/jwt';
import { TypeOrmModule } from '@nestjs/typeorm';
import { StudyMatchModule } from '../study-match/study-match.module';
import { StudyMatchService } from '../study-match/study-match.service';
import { DynamicController } from './dynamic.controller';
import { DynamicService } from './dynamic.service';

@Module({
  imports: [
    TypeOrmModule.forFeature([
      Dynamic,
      User,
      DynamicComment,
      DynamicLike,
      DynamicReply,
      DynamicFollow,
      StudyMatchResult,
      IntegralTask,
    ]),
    JwtModule.register({
      secret: jwtConstants.secret,
      signOptions: { expiresIn: '12h' },
    }),
  ],
  controllers: [DynamicController],
  providers: [DynamicService],
})
export class DynamicModule {}
